package com.alm.handle.mq.Impl;

import com.alm.handle.mq.ISysCommandService;
import com.alm.handle.mq.SysService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.List;

@Service
public class SysServiceImpl implements SysService {
    //
    private static final Logger logger = LoggerFactory.getLogger(SysServiceImpl.class);

    public ISysCommandService getSysCommandService(){
        try {
            Registry registry = LocateRegistry.getRegistry();
            return (ISysCommandService) registry.lookup("sysCommandService");
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }
}
